package com.front.managementfront.driver.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;

/**
 * <p>
 *
 * </p>
 *
 * @author yck
 * @since 2021-11-19
 */
public class CarInfo extends Model<CarInfo> {

    private static final long serialVersionUID = 1L;

    private String id;
    /**
     * 用户id
     */
    private String userId;
    /**
     * 车牌号
     */
    private String carCode;



    /**
     * 车辆车型
     */
    private String ehicleType;
    /**
     * 车长
     */
    private String vehicleLength;
    /**
     * 审核状态（0:默认；1：成功2：失败）
     */
    private Integer approvalStatus;
    /**
     * 审核类型（0：自动审核；1：人工审核）
     */
    private Integer approvalType;
    /**
     * 审核通过时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime approvalTime;
    /**
     * 审核人
     */
    private String approvalUser;
    /**
     * 是否默认（0：默认1：不默认）
     */
    private Integer isAuto;
    private String createBy;
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    private Integer delFlag;
    private String updateBy;
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
    @TableField(exist = false)
    private Map<String,CertificateImg> photoMap=new HashMap<>();

    public Map<String, CertificateImg> getPhotoMap() {
        return photoMap;
    }

    public void setPhotoMap(Map<String, CertificateImg> photoMap) {
        this.photoMap = photoMap;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getCarCode() {
        return carCode;
    }

    public void setCarCode(String carCode) {
        this.carCode = carCode;
    }






    public String getEhicleType() {
        return ehicleType;
    }

    public void setEhicleType(String ehicleType) {
        this.ehicleType = ehicleType;
    }

    public String getVehicleLength() {
        return vehicleLength;
    }

    public void setVehicleLength(String vehicleLength) {
        this.vehicleLength = vehicleLength;
    }

    public Integer getApprovalStatus() {
        return approvalStatus;
    }

    public void setApprovalStatus(Integer approvalStatus) {
        this.approvalStatus = approvalStatus;
    }

    public Integer getApprovalType() {
        return approvalType;
    }

    public void setApprovalType(Integer approvalType) {
        this.approvalType = approvalType;
    }

    public LocalDateTime getApprovalTime() {
        return approvalTime;
    }

    public void setApprovalTime(LocalDateTime approvalTime) {
        this.approvalTime = approvalTime;
    }

    public String getApprovalUser() {
        return approvalUser;
    }

    public void setApprovalUser(String approvalUser) {
        this.approvalUser = approvalUser;
    }

    public Integer getIsAuto() {
        return isAuto;
    }

    public void setIsAuto(Integer isAuto) {
        this.isAuto = isAuto;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public Integer getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    public static final String ID = "id";

    public static final String USER_ID = "user_id";

    public static final String CAR_CODE = "car_code";

    public static final String PEOPLE_CARS_PATH = "people_cars_path";

    public static final String DRIVING_LICENSE_PATH = "driving_license_path";

    public static final String COPILOT_PATH = "copilot_path";

    public static final String EHICLE_TYPE = "ehicle_type";

    public static final String VEHICLE_LENGTH = "vehicle_length";

    public static final String APPROVAL_STATUS = "approval_status";

    public static final String APPROVAL_TYPE = "approval_type";

    public static final String APPROVAL_TIME = "approval_time";

    public static final String APPROVAL_USER = "approval_user";

    public static final String IS_AUTO = "is_auto";

    public static final String CREATE_BY = "create_by";

    public static final String CREATE_TIME = "create_time";

    public static final String DEL_FLAG = "del_flag";

    public static final String UPDATE_BY = "update_by";

    public static final String UPDATE_TIME = "update_time";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "CarInfo{" +
                ", id=" + id +
                ", userId=" + userId +
                ", carCode=" + carCode +
                ", ehicleType=" + ehicleType +
                ", vehicleLength=" + vehicleLength +
                ", approvalStatus=" + approvalStatus +
                ", approvalType=" + approvalType +
                ", approvalTime=" + approvalTime +
                ", approvalUser=" + approvalUser +
                ", isAuto=" + isAuto +
                ", createBy=" + createBy +
                ", createTime=" + createTime +
                ", delFlag=" + delFlag +
                ", updateBy=" + updateBy +
                ", updateTime=" + updateTime +
                "}";
    }
}
